home *** CD-ROM | disk | FTP | other *** search
Wrap
Text File | 1996-05-01 | 9.7 KB | 273 lines | [ TEXT/MPS ]
{ File: ImageCodec.p Contains: QuickTime Interfaces. Version: Technology: QuickTime 2.1 Release: Universal Interfaces 3.0d3 on Copland DR1 Copyright: © 1984-1996 by Apple Computer, Inc. All rights reserved. Bugs?: If you find a problem with this file, send the file and version information (from above) and the problem description to: Internet: apple.bugs@applelink.apple.com AppleLink: APPLE.BUGS } {$IFC UNDEFINED UsingIncludes} {$SETC UsingIncludes := 0} {$ENDC} {$IFC NOT UsingIncludes} UNIT ImageCodec; INTERFACE {$ENDC} {$IFC UNDEFINED __IMAGECODEC__} {$SETC __IMAGECODEC__ := 1} {$I+} {$SETC ImageCodecIncludes := UsingIncludes} {$SETC UsingIncludes := 1} {$IFC UNDEFINED __TYPES__} {$I Types.p} {$ENDC} {$IFC UNDEFINED __QUICKDRAW__} {$I Quickdraw.p} {$ENDC} {$IFC UNDEFINED __QDOFFSCREEN__} {$I QDOffscreen.p} {$ENDC} {$IFC UNDEFINED __WINDOWS__} {$I Windows.p} {$ENDC} {$IFC UNDEFINED __IMAGECOMPRESSION__} {$I ImageCompression.p} {$ENDC} {$IFC UNDEFINED __COMPONENTS__} {$I Components.p} {$ENDC} {$IFC UNDEFINED __MOVIES__} {$I Movies.p} {$ENDC} {$PUSH} {$ALIGN MAC68K} {$LibExport+} {$IFC FOR_SYSTEM7_AND_SYSTEM8_COOPERATIVE } { codec component selectors } CONST codecGetCodecInfo = $00; codecGetCompressionTime = $01; codecGetMaxCompressionSize = $02; codecPreCompress = $03; codecBandCompress = $04; codecPreDecompress = $05; codecBandDecompress = $06; codecCDSequenceBusy = $07; codecGetCompressedImageSize = $08; codecGetSimilarity = $09; codecTrimImage = $0A; codecRequestSettings = $0B; codecGetSettings = $0C; codecSetSettings = $0D; codecCDSequenceFlush = $0E; codecSetTimeCode = $0F; codecIsImageDescriptionEquivalent = $10; codecNewMemory = $11; codecDisposeMemory = $12; codecHitTestData = $13; { codec selectors 0-127 are reserved by Apple } { codec selectors 128-191 are subtype specific } { codec selectors 192-255 are vendor specific } { codec selectors 256-32767 are available for general use } { negative selectors are reserved by the Component Manager } { codec capabilities flags } codecCanScale = $00000001; codecCanMask = $00000002; codecCanMatte = $00000004; codecCanTransform = $00000008; codecCanTransferMode = $00000010; codecCanCopyPrev = $00000020; codecCanSpool = $00000040; codecCanClipVertical = $00000080; codecCanClipRectangular = $00000100; codecCanRemapColor = $00000200; codecCanFastDither = $00000400; codecCanSrcExtract = $00000800; codecCanCopyPrevComp = $00001000; codecCanAsync = $00002000; codecCanMakeMask = $00004000; codecCanShift = $00008000; codecCanAsyncWhen = $00010000; codecCanShieldCursor = $00020000; codecCanManagePrevBuffer = $00040000; codecHasVolatileBuffer = $00080000; codecWantsRegionMask = $00100000; TYPE CodecCapabilitiesPtr = ^CodecCapabilities; CodecCapabilities = RECORD flags: LONGINT; wantedPixelSize: INTEGER; extendWidth: INTEGER; extendHeight: INTEGER; bandMin: INTEGER; bandInc: INTEGER; pad: INTEGER; time: LONGINT; END; { codec condition flags } CONST codecConditionFirstBand = $00000001; codecConditionLastBand = $00000002; codecConditionFirstFrame = $00000004; codecConditionNewDepth = $00000008; codecConditionNewTransform = $00000010; codecConditionNewSrcRect = $00000020; codecConditionNewMask = $00000040; codecConditionNewMatte = $00000080; codecConditionNewTransferMode = $00000100; codecConditionNewClut = $00000200; codecConditionNewAccuracy = $00000400; codecConditionNewDestination = $00000800; codecConditionFirstScreen = $00001000; codecConditionDoCursor = $00002000; codecConditionCatchUpDiff = $00004000; codecConditionMaskMayBeChanged = $00008000; codecConditionCodecChangedMask = $80000000; codecInfoResourceType = 'cdci'; { codec info resource type } codecInterfaceVersion = 2; { high word returned in component GetVersion } TYPE CDSequenceDataSourcePtr = ^CDSequenceDataSource; CDSequenceDataSource = RECORD recordSize: LONGINT; next: Ptr; seqID: ImageSequence; sourceID: ImageSequenceDataSource; sourceType: OSType; sourceInputNumber: LONGINT; dataPtr: Ptr; dataDescription: Handle; changeSeed: LONGINT; transferProc: ProcPtr; refCon: Ptr; END; CodecCompressParamsPtr = ^CodecCompressParams; CodecCompressParams = RECORD sequenceID: ImageSequence; { precompress,bandcompress } imageDescription: ImageDescriptionHandle; { precompress,bandcompress } data: Ptr; bufferSize: LONGINT; frameNumber: LONGINT; startLine: LONGINT; stopLine: LONGINT; conditionFlags: LONGINT; callerFlags: CodecFlags; capabilities: CodecCapabilitiesPtr; { precompress,bandcompress } progressProcRecord: ICMProgressProcRecord; completionProcRecord: ICMCompletionProcRecord; flushProcRecord: ICMFlushProcRecord; srcPixMap: PixMap; { precompress,bandcompress } prevPixMap: PixMap; spatialQuality: CodecQ; temporalQuality: CodecQ; similarity: Fixed; dataRateParams: DataRateParamsPtr; reserved: LONGINT; { The following fields only exist for QuickTime 2.1 and greater } majorSourceChangeSeed: UInt16; minorSourceChangeSeed: UInt16; sourceData: CDSequenceDataSourcePtr; END; CodecDecompressParamsPtr = ^CodecDecompressParams; CodecDecompressParams = RECORD sequenceID: ImageSequence; { predecompress,banddecompress } imageDescription: ImageDescriptionHandle; { predecompress,banddecompress } data: Ptr; bufferSize: LONGINT; frameNumber: LONGINT; startLine: LONGINT; stopLine: LONGINT; conditionFlags: LONGINT; callerFlags: CodecFlags; capabilities: CodecCapabilitiesPtr; { predecompress,banddecompress } progressProcRecord: ICMProgressProcRecord; completionProcRecord: ICMCompletionProcRecord; dataProcRecord: ICMDataProcRecord; port: CGrafPtr; { predecompress,banddecompress } dstPixMap: PixMap; { predecompress,banddecompress } maskBits: BitMapPtr; mattePixMap: PixMapPtr; srcRect: Rect; { predecompress,banddecompress } matrix: MatrixRecordPtr; { predecompress,banddecompress } accuracy: CodecQ; { predecompress,banddecompress } transferMode: INTEGER; { predecompress,banddecompress } frameTime: ICMFrameTimePtr; { banddecompress } reserved: ARRAY [0..0] OF LONGINT; { The following fields only exist for QuickTime 2.0 and greater } matrixFlags: SInt8; { high bit set if 2x resize } matrixType: SInt8; dstRect: Rect; { only valid for simple transforms } { The following fields only exist for QuickTime 2.1 and greater } majorSourceChangeSeed: UInt16; minorSourceChangeSeed: UInt16; sourceData: CDSequenceDataSourcePtr; maskRegion: RgnHandle; END; CONST matrixFlagScale2x = $00000080; matrixFlagScale1x = $00000040; matrixFlagScaleHalf = $00000020; FUNCTION CDGetCodecInfo(storage: Handle; VAR info: CodecInfo): ComponentResult; FUNCTION CDGetCompressionTime(storage: Handle; src: PixMapHandle; {CONST}VAR srcRect: Rect; depth: INTEGER; VAR spatialQuality: CodecQ; VAR temporalQuality: CodecQ; VAR time: LONGINT): ComponentResult; FUNCTION CDGetMaxCompressionSize(storage: Handle; src: PixMapHandle; {CONST}VAR srcRect: Rect; depth: INTEGER; quality: CodecQ; VAR size: LONGINT): ComponentResult; FUNCTION CDPreCompress(storage: Handle; VAR params: CodecCompressParams): ComponentResult; FUNCTION CDBandCompress(storage: Handle; VAR params: CodecCompressParams): ComponentResult; FUNCTION CDPreDecompress(storage: Handle; VAR params: CodecDecompressParams): ComponentResult; FUNCTION CDBandDecompress(storage: Handle; VAR params: CodecDecompressParams): ComponentResult; FUNCTION CDCodecBusy(storage: Handle; seq: ImageSequence): ComponentResult; FUNCTION CDGetCompressedImageSize(storage: Handle; desc: ImageDescriptionHandle; data: Ptr; bufferSize: LONGINT; dataProc: ICMDataProcRecordPtr; VAR dataSize: LONGINT): ComponentResult; FUNCTION CDGetSimilarity(storage: Handle; src: PixMapHandle; {CONST}VAR srcRect: Rect; desc: ImageDescriptionHandle; data: Ptr; VAR similarity: Fixed): ComponentResult; FUNCTION CDTrimImage(storage: Handle; Desc: ImageDescriptionHandle; inData: Ptr; inBufferSize: LONGINT; dataProc: ICMDataProcRecordPtr; outData: Ptr; outBufferSize: LONGINT; flushProc: ICMFlushProcRecordPtr; VAR trimRect: Rect; progressProc: ICMProgressProcRecordPtr): ComponentResult; {$ENDC} {$IFC FOR_SYSTEM7_AND_SYSTEM8_DEPRECATED } FUNCTION CDRequestSettings(storage: Handle; settings: Handle; VAR rp: Rect; filterProc: ModalFilterUPP): ComponentResult; {$ENDC} {$IFC FOR_SYSTEM7_AND_SYSTEM8_COOPERATIVE } FUNCTION CDGetSettings(storage: Handle; settings: Handle): ComponentResult; FUNCTION CDSetSettings(storage: Handle; settings: Handle): ComponentResult; FUNCTION CDCodecFlush(storage: Handle): ComponentResult; FUNCTION CDCodecSetTimeCode(storage: Handle; timeCodeFormat: UNIV Ptr; timeCodeTime: UNIV Ptr): ComponentResult; FUNCTION CDCodecIsImageDescriptionEquivalent(storage: Handle; newDesc: ImageDescriptionHandle; VAR equivalent: BOOLEAN): ComponentResult; FUNCTION CDCodecNewMemory(storage: Handle; VAR data: Ptr; dataSize: Size; dataUse: LONGINT; memoryGoneProc: ICMMemoryDisposedUPP; refCon: UNIV Ptr): ComponentResult; FUNCTION CDCodecDisposeMemory(storage: Handle; data: Ptr): ComponentResult; FUNCTION CDCodecHitTestData(storage: Handle; desc: ImageDescriptionHandle; data: UNIV Ptr; dataSize: Size; where: Point; VAR hit: BOOLEAN): ComponentResult; {$ENDC} {$ALIGN RESET} {$POP} {$SETC UsingIncludes := ImageCodecIncludes} {$ENDC} {__IMAGECODEC__} {$IFC NOT UsingIncludes} END. {$ENDC}